import axios from '@/axios'
enum API {
    INSPECTOR_GETALL = '/getInspectorAll',
    INSPECTOR_GETPAGE = '/getInspectorPage',
    INSPECTOR_GETKEYPAGE = '/SearchInspectorKey',
    INSPECTOR_UPDATEBYID = '/updataInspectorById',
    INSPECTOR_DELETEBYID = '/deleteInspectorById',
    INSPECTOR_DELETEMOREBYID = '/deleteInspectorMoreById',
    INSPECTOR_ADD = '/addInspector',
    
}
// 获取所有居民信息
export const getInspectorAllAPI = () => axios.get(API.INSPECTOR_GETALL)
// 分页查询居民
export const getInspectorPageAPI = (data: any) => axios.post(API.INSPECTOR_GETPAGE, data)
// 指定key-value分页查询居民
export const getInspectorKeyPageAPI = (data: any) => axios.post(API.INSPECTOR_GETKEYPAGE, data)
// 根据id更新居民
export const UpdateInspectorByIdAPI = (data: any) => axios.post(API.INSPECTOR_UPDATEBYID, data)
// 根据id删除居民
export const DeleteInspectorByIdAPI = (id: string) => axios.delete(`${API.INSPECTOR_DELETEBYID}/${id}`)
// 根据id批量居民
export const DeleteInspectorMoreByIdAPI = (ids: any) => axios.post(API.INSPECTOR_DELETEMOREBYID, ids)
// 添加居民
export const AddInspectorAPI = (data: any) => axios.post(API.INSPECTOR_ADD, data)